/*
 * Copyright 2009 Tran Nhut Trung.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */
package com.gdevelop.gwtxp.gen;

import com.google.gwt.user.client.ui.FlexTable;

import java.util.List;

/**
 * Table shows data from its values attribute
 */
public class DataTable extends FlexTable{
  private List values;
  private String var;
  private int selectedIndex;
  
  public DataTable() {
  }

  public List getValues() {
    return values;
  }
  /**
   * List of values to be shown in this table
   * @param values
   */
  public void setValues(List values) {
    this.values = values;
  }

  public String getVar() {
    return var;
  }
  /**
   * Variable name, used to display a row
   * @param var
   */
  public void setVar(String var) {
    this.var = var;
  }

  public int getSelectedIndex() {
    return selectedIndex;
  }
  /**
   * Index of selected row
   * @param selectedIndex
   */
  public void setSelectedIndex(int selectedIndex) {
    this.selectedIndex = selectedIndex;
  }
}
